<template>
  <div class="dashboard-container">
    <div class="dashboard-text">消息: {{messages}}条</div>
    <div class="dashboard-text">待回复消息: {{needReply}}条</div>
    <div v-if="role == 'user'" class="dashboard-text">已回复消息: {{messages - needReply}}条</div>
    <div v-else class="dashboard-text">跟进消息: {{messages - needReply}}条</div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  data() {
    return {
      needReply: 2
    }
  },
  computed: {
    ...mapGetters([
      'role',
      'messages'
    ])
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
